<?php

class UrlMapping {
	private static $moduleMappings = array(

		'login' => array('user','login'),
		'mustlogin' => array('user','mustlogin'),
		'loginstatus' => array('user','loginstatus'),
		'logout' => array('user','logout'),

		'adduser' => array('user','add'),
		'deleteuser' => array('user','delete'),
		'updateuser' => array('user','update'),
		'getusers' => array('user','getusers'),
		'uploaduserimage' => array('user','upload'),
		'deleteuserimage' => array('user','deleteimage'),
		'getusersbyproj' => array('user','getusersbyproj'),
		'getuserimage' => array('user','getimage'),
		'getuserprofilewithpoints' => array('user','getuserprofilewithpoints'),

		'addproject' => array('project','add'),
		'getprojects' => array('project','get'),
		'deleteproject' => array('project','delete'),
		'updateproject' => array('project','update'),

		'addgroup' => array('group','add'),
		'getgroups' => array('group','get'),
		'deletegroup' => array('group','delete'),
		'updategroup' => array('group','update'),	

		'addtask' => array('task','add'),
		'gettasks' => array('task','get'),
		'getusertasks' => array('task','getusertasks'),
		'getuserdonetasks' => array('task','getuserdonetasks'),
		'getuserdonetasksinprj' => array('task','getuserdonetasksinprj'),
		'deletetask' => array('task','delete'),
		'updatetask' => array('task','update'),
		'updatetaskstatus' => array('task','updatestatus'),
		'changeorder' => array('task','changeorder'),
		'getstatuslist' => array('task','getstatus'),
		'uploadimage' => array('task','upload'),
		'deleteimage' => array('task','deleteimage'),
		'getuserstaskscount' => array('task','getuserstaskscount'),
		'movetask' => array('task','movetask'),
		'getnotifications' => array('task','getnotifications'),
		'adddailytask' => array('task','adddailytask'),
		'movedailytask' => array('task','movedailytask'),

		'sendreportmails' => array('mail','report'),

		'mailnewtask' => array('mailbody','newtask'),
		'mailreportupdates' => array('mailbody','reportupdates'),
		'mailreportupdatesadm' => array('mailbody','reportupdatesadm'),
		'mailreportupdatesuser' => array('mailbody','reportupdatesuser'),
		'mailnomoretasksadm' => array('mailbody','nomoretasksadm'),
		'mailnomoretasksuser' => array('mailbody','nomoretasksuser'),

		'addtasktype' => array('tasktype','add'),
		'gettasktypes' => array('tasktype','get'),
		'deletetasktype' => array('tasktype','delete'),
		'updatetasktype' => array('tasktype','update'),

		'yammeraddverifier' => array('yammer','addverifier'),
		'yammergetstatus' => array('yammer','getstatus'),

		'pointtypeadd' => array('pointtype','add'),
		'pointtypeupdate' => array('pointtype','update'),
		'pointtypedelete' => array('pointtype','delete'),
		'pointtypeget' => array('pointtype','get'),

		'taskpointadd' => array('taskpoint','add'),
		'taskpointupdate' => array('taskpoint','update'),
		'taskpointdelete' => array('taskpoint','delete'),
		'taskpointget' => array('taskpoint','get'),
		'getuserpoints' => array('taskpoint','getuserpoints'),

		'yammernewtask' => array('yammerbody','newtask'),
		'yammerupdatetask' => array('yammerbody','updatetask'),
		'yammernomoretasksadm' => array('yammerbody','nomoretasksadm'),
		'yammernomoretasksuser' => array('yammerbody','nomoretasksuser'),

		'addlevel' => array('level','add'),
		'getlevelinfo' => array('level','get'),
		'deletelevel' => array('level','delete'),
		'updatelevel' => array('level','update')
	);

	public static function getModulePair($key) {
		if(array_key_exists($key, UrlMapping::$moduleMappings ) == true) {
			return UrlMapping::$moduleMappings[$key];
		}
		return array('error','badcmd');
	}
}

?>
